import Vue from 'vue'
import store from '@/store'
import VueI18n from 'vue-i18n'

Vue.use(VueI18n)

const messages = {
  zh: {
    message: {
      hello: '好好学习，天天向上！',
      home: '首页',
      goods: '商品'
    }
  },
  en: {
    message: {
      hello: 'good good study, day day up!',
      home: 'home',
      goods: 'goods'
    }
  }
}

const i18n = new VueI18n({
  locale: store.state.language.lang.value, // 语言标识 zh en
  // locale: 'en', // 语言标识
  messages
})

export default i18n;
